LassoScript Utility
Basics Browse Detail

[Tag->Run]

Tag Link [Tag->Run] Category Tags
Type Member Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Any
Output Type Any Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

The [Tag->Run] tag can be used to execute a tag or compound expression. Calling this tag is equivalent to calling a tag directly, but can be useful since parameters can be manipulated programmatically.

A reference to a tag can be retrieved through the \ symbol, the [Tags] map, or the [Null->Properties->Second] map of a data type.

Compound expressions can be created by surrounding a portion of LassoScript style code with braces {}. The compound expression can be stored in a variable or run using the [Tag->Run] tag.

The -Params parameter allows an array of parameters to be passed to the tag.

The -Name parameter allows the name of the tag which is being called to be passed to the tag. This parameter is required for built-in tags which rely on the name of the tag to determine what code to execute. Within a processing tag [Tag_Name] can be used to retrieve this value.

The -Owner parameter is required for member tag calls. It defines what data object the tag should act upon.

Syntax

\TagName->(Run: -Name='tagname', -Params=(Array: ...))]

[Tags->(Find: 'tagname')->(Run: -Name='tagname')]

[Tags->(Find: 'tagname')->(Run: -Params=(Array: ...))]

[Array->Properties->Second->(Find: 'tagname')->(Run: -Params=(Array: ...), -Owner=(Array))]

[{ Return: 'Value' }->(Run)]

[Variable: 'myExpression' = { Return: 'Value' }]
[Output: $myExpression->(Run)]

Parameters

Optional Parameters
-Params The array of parameters which the tag should act upon. Defaults to the empty array if not specified.
-Name The name of the tag to be called. Required for many built-in LDML tags.
-Owner The data object which a member tag should act upon. Required for member tag calls.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.